package cn.larry.aop.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Profile;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import cn.larry.aop.service.within.WithinService;

/**
 * @author LarryZeal
 *
 */
@Profile("within")
@RestController
@RequestMapping("/within")
public class WithinController {
	@Autowired
	private WithinService withinService;

	@GetMapping("/hi")
	public String within_hi() {
		return withinService.hi();
	}

	@GetMapping("/hey")
	public String within_hey() {
		return withinService.hey();
	}

	@GetMapping("/div")
	public String within_div() throws Exception {
		return withinService.div(1, 0) + "";
	}
}
